/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.rum.sender.senders;

import cz.muni.fi.rum.sender.command.RapRequest;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author pmikulasek
 */
public class ForceSender implements MainSender {

    private static ForceSender instance;
    private static final List<RapRequest> EMPTY_LIST = Collections.unmodifiableList(new LinkedList<RapRequest>());

    private ForceSender() {
    }

    public static ForceSender getInstance() {
        if (instance == null) {
            instance = new ForceSender();
        }
        return instance;
    }

    @Override
    public void addRequest(RapRequest request) {
        request.execute();
    }

    @Override
    public void removeRequest(RapRequest request) {
        throw new UnsupportedOperationException("This method not supported.");
    }

    @Override
    public void removeAllRequest() {
        throw new UnsupportedOperationException("This method not supported.");
    }

    @Override
    public void sendAllRequests() {
        throw new UnsupportedOperationException("This method not supported.");
    }

    @Override
    public List<RapRequest> getAllRequests() {
        return EMPTY_LIST;
    }
}
